Natural Semantics for Non-Determinism

نویسندگان

  • Andrew Moran
  • Thierry Coquand
  • Peter Dybjer
  • Andy Gordon
  • John Launchbury
چکیده

We present a natural semantics for the untyped lazy -calculus plus McCarthy's amb, a nondeterministic choice operator. The natural semantics includes rules for both convergent behaviour (de ned inductively) and divergent behaviour (de ned co-inductively). This semantics is equivalent to a small step reduction semantics that corresponds closely to our operational intuitions about McCarthy's amb. We present equivalences for convergent and divergent behaviour based on the natural semantics and prove a Context Lemma for the convergence equivalence. We then give a -theory l8, based on the equivalences for convergent and divergent behaviour. Since it is able to distinguish between programs that di er only in their divergent behaviour, the -theory is more discriminating than equational theories based on current domain-theoretic models. It is therefore more suitable for reasoning about functional programs containing McCarthy's amb.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A duality between LM-fuzzy possibility computations and their logical semantics

Let X be a dcpo and let L be a complete lattice. The family σL(X) of all Scott continuous mappings from X to L is a complete lattice under pointwise order, we call it the L-fuzzy Scott structure on X. Let E be a dcpo. A mapping g : σL(E) −> M is called an LM-fuzzy possibility valuation of E if it preserves arbitrary unions. Denote by πLM(E) the set of all LM-fuzzy possibility valuations of E. T...

متن کامل

Compiling Natural Semantics Into ML

This paper presents a compilation scheme from natural semantics speciications to ML. Permutations of premises allow, for a class of speciications, a purely functional execution and can reduce non-determinism. This method uses some speciic features of ML, like exceptions , closures and pattern-matching.

متن کامل

Non-deterministic Böhm trees

Lambda calculus is well established as the formal model of functional programming. Non-determinism is an interesting conceptual issue, often considered in process-calculi. It is interesting to mix lambda-calculus and non-determinism, firstly because programmers use functional programming but also concurrent methods, networks and multi-users systems, secondly as a step towards more complex langu...

متن کامل

Operational Semantics for Functional Logic Languages

In this work we provide a semantic description of functional logic languages covering notions like laziness, sharing, and non-determinism. Such a semantic description is essential, for instance, to have appropriate language definitions in order to reason about programs and check the correctness of implementations. First, we define a “big-step” semantics in natural style to relate expressions an...

متن کامل

A Compiler for Natural SemanticsMikael

Natural semantics is a formalism used for specifying both semantics and implementations of programming languages. Until recently, no practical implementation of the formalism existed. We have deened the Relational MetaLanguage , RML, as an executable speciication language for natural semantics. After a brief outline of the language, we describe the compilation strategy used by our rml2c compile...

متن کامل

Unique Fixed Point Induction

We develop an operational theory of higher-order functions, recursion, and fair non-determinism for a non-trivial, higher-order, call-by-name functional programming language extended with McCarthy's amb. Implemented via fair parallel evaluation, functional programming with amb is very expressive. However, conventional semantic xed point principles for reasoning about recursion fail in the prese...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1993